<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <HEAD>
        <META content="IE=10.000" http-equiv="X-UA-Compatible">
        <META http-equiv="Content-Type" content="text/html; charset=utf-8">
        <META http-equiv="X-UA-Compatible" content="IE=edge">
        <LINK href="${base}/template/admin/source/set_files/bootstrap_min.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/style.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/inside.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/datepicker.css" rel="stylesheet" type="text/css" media="all">
        <LINK href="${base}/template/admin/source/set_files/daterangepicker.css" rel="stylesheet" type="text/css" media="all">
        <SCRIPT src="${base}/template/admin/source/set_files/jQuery.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_form_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/bootstrap_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_validate_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_validate_methods.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_jplayer_min.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/jquery_mb_miniPlayer.js" type="text/javascript"></SCRIPT>
        <SCRIPT src="${base}/template/admin/source/set_files/zeroclipboard_min.js" type="text/javascript"></SCRIPT>
        <script type="text/javascript" src="${base}/template/common/js/include.js"></script>
		<script type="text/javascript">
			$().ready(function() {
				var $allChecked = $(".allChecked");
				$allChecked.click( function() {
					var $this = $(this);
					var $thisCheckbox = $this.parent().parent().find(":checkbox");
					if ($thisCheckbox.filter(":checked").size() > 0) {
						$thisCheckbox.attr("checked", false);
					} else {
						$thisCheckbox.attr("checked", true);
					}
					return false;
				});
				$.validator.addMethod("roleAuthorityListRequired", $.validator.methods.required, "请选择管理权限");
				
				$.validator.addClassRules("roleAuthorityList", {
					roleAuthorityListRequired: true
				});
			})
		</script>
        <TITLE>
        </TITLE>
        <META name="GENERATOR" content="MSHTML 10.00.9200.16578">
    </HEAD>
    <style>
    	.hidden{display:none;}
    </style>
    <BODY>
        <DIV id="main">
            <DIV class="container-fluid">
                <DIV class="row-fluid">
                    <DIV class="span12">
                        <DIV class="box">
                            <DIV class="box-title">
                                <DIV class="span12">
                                    <H3>
										角色设置
                                    </H3>
                                </DIV>
                            </DIV>
                            <DIV class="box-content">
                                <FORM class="form-horizontal form-validate" action="<#if isAddAction>role!save.shtml<#else>role!update.shtml</#if>"
                                method="post">
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 用户名：
                                        </LABEL>
                                        <DIV class="controls">
                                            <INPUT name="role.name" class="input-xlarge" id="name" type="text" value="${(role.name)!}" data-rule-required="true" data-rule-maxlength=32>
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 描述：
                                        </LABEL>
                                        <DIV class="controls">
                                            <INPUT name="role.roleDesc" class="input-xlarge" id="password" type="text" value="${(role.roleDesc)!}"/>
                                        </DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 <a href="javascript:void(0);" class="allChecked" title="点击全选此类权限">管理员管理：</a>
                                        </LABEL>
                                        <DIV class="controls">
											<input type="checkbox" name="role.authorityList" class="roleAuthorityList" value="ROLE_INDEX"<#if (isAddAction || role.authority?index_of("ROLE_INDEX") != -1)!false> checked</#if> />管理员管理
											<input type="checkbox" name="role.authorityList" class="roleAuthorityList" value="ROLE_INDEX"<#if (isAddAction || role.authority?index_of("ROLE_INDEX") != -1)!false> checked</#if> />角色管理
										</DIV>
                                    </DIV>
                                    <DIV class="control-group">
                                        <LABEL class="control-label" for="title">
											 <a href="javascript:void(0);" class="allChecked" title="点击全选此类权限">系统管理：</a>
                                        </LABEL>
                                        <DIV class="controls">
											<input type="checkbox" name="role.authorityList" class="roleAuthorityList" value="ROLE_SETTING"<#if (isAddAction || role.authority?index_of("ROLE_SETTING") != -1)!false> checked</#if> />系统设置
										</DIV>
                                    </DIV>
                                    <INPUT name="id" type="hidden" value="${id}">
                                    <DIV class="form-actions">
                                        <BUTTON class="btn btn-primary" id="bsubmit" type="submit" data-loading-text="提交中...">
											保存
                                        </BUTTON>
                                        <BUTTON class="btn btn-primary" onclick="window.history.back(); return false;" type="button" data-loading-text="返回中...">
											返回
                                        </BUTTON>
                                    </DIV>
                                </FORM>
                            </DIV>
                        </DIV>
                    </DIV>
                </DIV>
            </DIV>
        </DIV>
    </BODY>
</HTML>